<template>
  <view class="box">
    <view class="top">
      <view class="title">
        <image class="back" src="https://pic.bangbangtongcheng.com/static/back.png" @click="back" />
        快捷登录注册
      </view>
    </view>
    <view class="" style="width: 130rpx; height: 130rpx; margin: 0 auto; margin-top: 200rpx">
      <image
        style="width: 100%; height: 100%; border-radius: 10rpx"
        src="/static/logo.png"
        mode="widthFix"
        alt=""
      />
    </view>
    <view class="login-box">
      <!-- <view class="box-title">用户快捷登录</view> -->
      <view class="input-box">
        <view class="area">+86</view>
        <view class="line"></view>
        <input
          v-model="phone"
          placeholder="请输入手机号"
          type="number"
          placeholder-class="input-placeholder"
          style="padding-left: 70rpx"
          maxlength="11"
          minlength="11"
        />
      </view>
      <view class="box1" v-if="isLogin">
        <view class="input-box" v-if="!isPassword">
          <input
            v-model="Verifys"
            placeholder="请输入验证码"
            style="width:70%;"
            placeholder-class="input-placeholder"
            type="number"
          />
          <view class="getcode" @click="getcode">{{ content }}</view>
        </view>
        <view class="input-box" style="position: relative" v-else>
          <input
            v-model="password"
            placeholder="请输入密码（最少6位）"
            style="width:70%;"
            placeholder-class="input-placeholder"
            :password="passwordHide"
          />
          <image
            modl="widthFix"
            style="width: 40rpx; height: 40rpx; position: absolute; right: 0; top: 10rpx; z-index: 1;"
            :src="
              passwordHide
                ? 'https://pic.bangbangtongcheng.com/static/closeEye.png'
                : 'https://pic.bangbangtongcheng.com/static/openEye.png'
            "
            @click="hide()"
          />
          <!-- <img style="width:40rpx;position: absolute;right: 0;top:0" src="" v-else @click='hide()'> -->
        </view>
      </view>
      <view class="box1" v-else>
        <view class="input-box">
          <input
            v-model="Verifys"
            style="width:70%;"
            placeholder="请输入验证码"
            placeholder-class="input-placeholder"
            type="number"
          />
          <view class="getcode" @click="getcode">{{ content }}</view>
        </view>
        <view class="input-box" style="position: relative">
          <input
            v-model="password"
            placeholder="请输入密码（最少6位）"
            style="width:70%;"
            placeholder-class="input-placeholder"
            :password="passwordHide"
          />
          <image
            modl="widthFix"
            style="width: 40rpx; height: 40rpx; position: absolute; right: 0; top: 10rpx; z-index: 1;"
            :src="
              passwordHide
                ? 'https://pic.bangbangtongcheng.com/static/closeEye.png'
                : 'https://pic.bangbangtongcheng.com/static/openEye.png'
            "
            @click="hide()"
          />
          <!-- <img style="width:40rpx;position: absolute;right: 0;top:0" src="" v-else @click='hide()'> -->
        </view>
      </view>
      <!-- <view class="agreement">
				<label style="display: flex;">
					<checkbox-group class="checkbox-group" @change="checkboxC">
						<checkbox value="1" class="round blue" :checked="status"
							:style="status ? 'background:#007aff' : ''" />
					</checkbox-group>
					<view class="text">
						<text>登录即同意</text>
						<view class="tags" @click.stop="tags(3)">《用户协议》</view>
						<view class="tags" @click.stop="tags(2)">《隐私协议》</view>
					</view>
				</label>
			</view> -->
      <button
        class="login"
        :disabled="loading"
        :loading="loading"
        hover-class="button-hover"
        @click="login"
      >
        登录
      </button>
      <view class="flex-center">
        <view class="password" v-if="!isPassword" @click="passwordC">账号密码登录</view>
        <view class="password" v-else @click="passwordC">手机验证码登陆</view>
       <!-- <view class="line">|</view>
        <view class="register" @click="isAutoLogin">本机号码一键登录</view> -->
      </view>
    </view>

    <view class="bottom-nav">
      <!-- #ifdef APP-PLUS -->
      <!-- <view class="bottom-top">
				<view class="line"></view>
				<view class="title-text">其他方式登录</view>
				<view class="line"></view>
			</view> -->
      <!-- #endif -->
      <view class="bottom-loginType">
        <!-- #ifdef APP-PLUS -->
        <view class="type" @click="isAutoLogin()">
          <image src="https://pic.bangbangtongcheng.com/static/phoneLogin.png" />
          <view>手机号</view>
        </view>
        <view class="type" @click="handleThirdLoginApp(1)" v-if="isWeixinInstalled">
          <image src="https://pic.bangbangtongcheng.com/static/weixin.png" />
          <view>微信</view>
        </view>
        <view class="type" @click="alipayLogin(1)" v-if="isAlipayInstalled">
          <image src="https://pic.bangbangtongcheng.com/static/zfb.png" />
          <view>支付宝</view>
        </view>
        <!-- 苹果登录 -->
        <view class="type" v-if="platform == 'ios' || platform == 'IOS'" @click="appleLogin(1)">
          <image src="https://pic.bangbangtongcheng.com/static/apples.png" />
          <view>apple</view>
        </view>
        <!-- #endif -->
        <!-- <view class="type">
          <image src="https://pic.bangbangtongcheng.com/static/pd.png" />
          <view>平度之窗</view>
        </view> -->
      </view>
    </view>

    <!-- 隐私协议/用户协议 -->
    <view class="privacy-box">
      <u-checkbox-group
        v-model="checkboxValue"
        placement="row"
        activeColor="#64b6a8"
        @change="checkboxChange"
      >
        <u-checkbox name="agreement"></u-checkbox>
      </u-checkbox-group>
      <text>已阅读并同意</text>
      <text style="color: #64b6a8" @click="toPrivacyPage(1)">帮帮同城用户协议</text>
      <text>和</text>
      <br />
      <text style="color: #64b6a8" @click="toPrivacyPage(2)">帮帮同城隐私协议</text>
    </view>

    <!-- <cover-view></cover-view> -->

    <view class="motaikuang" v-show="show" @click="show = false">
      <div class="verify" @click.stop="aaa">
        <verify :show="show" @Handle="Handle"></verify>
      </div>
    </view>
    <view class="motaikuang1" v-show="show1" @click="show1 = false">
      <view class="text" @click.stop="aaa">
        <view class="textTitle">{{ text }}</view>
        <scroll-view class="scroll-view" scroll-y :scroll-top="scrollTop" @scroll="scrollTop2">
          <!-- <rich-text :nodes="data.content"></rich-text> -->
          <!-- #ifdef MP-WEIXIN -->
          <mp-html :content="data.content"></mp-html>
          <!-- #endif -->
          <!-- #ifndef MP-WEIXIN -->
          <mp-html :content="data.content"></mp-html>
          <!-- #endif -->
        </scroll-view>
      </view>
    </view>
    <uni-popup ref="binds" mode="center" :mask-click="false">
      <view class="binds_frame">
        <view class="binds_frame_t">提示</view>
        <view class="binds_frame_c">当前用户已被冻结，无法登录！</view>
        <view class="binds_frame_b">
          <view class="cancel" @click="jcbdCancel">取消</view>
          <view class="determine" @click="confirmReceipt">去申诉</view>
        </view>
      </view>
    </uni-popup>
    <view class="motaikuang motaikuang2" v-show="show2" @click="show2 = false">
      <view class="tips" @click.stop="aaa">
        <view class="text">
          为了保护您的合法权益，登录/注册前请仔细阅读并同意以下协议:
          <view class="tags" @click="toPrivacyPage(1)">《用户协议》</view>
          &
          <view class="tags" @click="toPrivacyPage(2)">《隐私协议》</view>
        </view>
        <view class="btns">
          <view class="btn flex_center" @click="show2 = false">不同意</view>
          <view class="btn flex_center" @click="confirmClick">同意</view>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
  import Verify from '@/components/VueImageVerify.vue'
  //#ifdef H5
  import wxshare from '../../utils/index.js'
  //#endif
  //#ifdef APP-PLUS
  // const AlipayModule = uni.requireNativePlugin("Alipaylogin-AlipayModule");
  // #endif
  // const plug = uni.requireNativePlugin("Html5app-AlipayAuth");
  export default {
    data() {
      return {
        phone: '',
        Verifys: '',
        show: false,
        show1: false,
        totalTime: 60,
        password: '',
        content: '获取验证码',
        canClick: true,
        status: true,
        reg_tel: /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-9])\d{8}$/,
        loading: false,
        code: '',
        isPassword: false,
        checkBoxs: [],
        type: '',
        text: '',
        data: {},
        system: '',
        platform: '',
        passwordHide: true,
        targetArr: [{}, {}, {}, {}],
        curTarget: 0,
        scrollTop: 0,
        oldScrollTop: 0,
        userIds: '',
        convencid: uni.getStorageSync('convencid') ? uni.getStorageSync('convencid') : '',
        show2: false,
        loginType: '', // 登录方式
        isLogin: true,
        isNeedBack: false, // 是否登录后返回
        checkboxValue: [],
		isWeixinInstalled:false,
		isAlipayInstalled:false,
		buttonsList:[
			{
              provider: 'phone',
              iconPath: '/static/phone.png', // 图标路径仅支持本地图片
            }            
        ]
      }
    },
    components: {
      verify: Verify,
    },
    onLoad(options) {
      console.log('options', options);
      // 如果游客登录成功，还需要返回之前的页面
      if (options.isNeedBack) {
        this.isNeedBack = options.isNeedBack
      }
      /* #ifdef H5 */
      this.jinzhi()
      /* #endif */
      // 先判断 系统版本
      uni.getSystemInfo({
        success: (res) => {
          this.system = res.system.substring(4, 6)
          this.platform = res.platform
        },
        fail: (err) => {},
        complete: () => {},
      })
      // #ifdef APP-PLUS
      console.log('APP手机一键登录')
	  this.isWeixinInstalled = plus.runtime.isApplicationExist({pname: 'com.tencent.mm', action: 'weixin://'});
      this.isAlipayInstalled = plus.runtime.isApplicationExist({pname: 'com.eg.android.AlipayGphone', action: 'alipay://'});
	  if(this.isWeixinInstalled){
		  this.buttonsList.push(
			  {
				provider: 'weixin',
				iconPath: '/static/wx.png', // 图标路径仅支持本地图片
			  }
		  )
	  }
      if(this.isAlipayInstalled){
		  this.buttonsList.push(
			  {
				provider: 'Alipay',
				iconPath: '/static/Alipay.png', // 图标路径仅支持本地图片
			  }
		  )
	  }
      this.isAutoLogin()
      // #endif
      return
      this.$myRequest
        .get('/mob/login/getUserByWXOpenId', {
          openId: 'oOuEt5uxj_P1pHc33-OIj03VpLXc',
          convencid: '8ed33ec830089e78715b00e3ca3b688e',
        })
        .then((res) => {
          console.log('获取的信息是:', res)
          this.userInfo = res.userInfo
          if (!res.userInfo.phone) {
            if (res.userInfo == {} || !res.userInfo.phone) {
              uni.showToast({
                title: '请绑定手机号',
                icon: 'none',
                mask: true,
              })
              setTimeout(function () {
                uni.navigateTo({
                  url: '/pages/login/register',
                })
              }, 1500)
            }
          } else {
            if (!res.success) {
              uni.showToast({
                title: res.msg,
                icon: 'none',
                mask: true,
              })
              if (res.msg == '当前用户已被冻结，无法登录') {
                this.$refs.binds.open()
                this.userIds = res.userInfo.id
              }
            } else {
              uni.setStorageSync('Pduser', res.userInfo)
              this.$store.dispatch('user/login', res.userInfo)
              setTimeout(function () {
                uni.navigateBack({
                  delta: 1,
                })
                uni.closeAuthView() //关闭授权登录界面
              }, 500)
            }
          }
        })
    },
    // onBackPress(from){
    //   console.log('返回被触发-------------------');
    //   console.log(from);
	  //   // return false;
    //   setTimeout(() => {
    //     uni.reLaunch({
    //       url: '/pages/index/index',
    //     });
    //   }, 100);
    //   return false;
    // },
    methods: {
      confirmClick() {
        this.show2 = false
        this.checkboxValue = ['agreement']
        if (this.loginType == 'phone') {
          // 验证码 / 密码
          this.login()
        } else if (this.loginType == 'weixin') {
          // 微信
          this.handleThirdLoginApp()
        }  else if (this.loginType == 'Alipay') {
          // 支付宝
          this.alipayLogin()
        } else if (this.loginType == 'apple') {
          // 苹果
          this.appleLogin()
        }
      },
      jcbdCancel() {
        this.$refs.binds.close()
      },
      confirmReceipt() {
        uni.navigateTo({
          url: '/pages_my/complaint?id=' + this.userIds,
        })
      },
      scrollTop2(e) {
        //记录scroll  位置
        this.oldScrollTop = e.detail.scrollTop
      },

      hide() {
        this.passwordHide = !this.passwordHide
      },
      back() {
        uni.reLaunch({
          url: '/pages/index/index',
        })
        // if (uni.getStorageSync('Pduser')) {
        //   uni.navigateBack({
        //     delta: 1,
        //   })
        // } else {
        //   uni.reLaunch({
        //     url: '/pages/index/index',
        //   })
        // }
      },

      aaa() {},
      codes(code) {
        this.Verifys = code
      },
      Handle(success) {
        console.log(success, '登录')
        if (!this.canClick) return //改动的是这两行代码
        this.canClick = false
        this.show = false
        this.content = this.totalTime + 's后重新发送'
        this.$myRequest
          .get('/mob/login/phoneVerification.do', {
            phone: this.phone,
          })
          .then((res) => {
            if (res.success) {
              this.code = res.CODE
            } else {
              uni.showToast({
                title: res.msg,
                icon: 'none',
                mask: true,
              })
            }
            console.log(res)
          })
        let clock = setInterval(() => {
          this.totalTime--
          this.content = this.totalTime + 's后重新发送'
          if (this.totalTime < 0) {
            clearInterval(clock)
            this.content = '重新发送验证码'
            this.totalTime = 60
            this.canClick = true //这里重新开启
          }
        }, 1000)
      },
      // 判断是否支持一键登陆
      isAutoLogin() {
        let _that = this
        uni.showLoading({
          title: '获取手机号中',
        })
        uni.getProvider({
          //获取可用的服务提供商
          service: 'oauth',
          success: function (res) {
            console.log(res.provider) // ['weixin', qq', 'univerify']
          },
        })
        uni.preLogin({
          //预登录
          provider: 'univerify', //用手机号登录
          success() {
            console.log('预登录成功', _that.platform)
            uni.hideLoading()
            // _that.autoStatus = true
            if (_that.platform == 'ios' || _that.platform == 'IOS') {
				_that.buttonsList.push( 
					{
					  provider: 'apple',
					  iconPath: '/static/apple.png', // 图标路径仅支持本地图片
					}
				)
              _that.submitlogin()
            } else {
              _that.submitAndroid()
            }
          },
          fail(err) {
            //预登录失败
            console.log('预登录失败', err)
            uni.hideLoading()
            // _that.autoStatus = false
            // if (!_that.autoStatus) {
              // uni.showToast({
              // 	title: err.errMsg,
              // 	icon: "none",
              // 	mask: true
              // });
              // uni.navigateTo({
              //   url: "/pages/login/login"
              // });
              // return
            // }
          },
        })
      },
      submitlogin() {
        let that = this
        const univerifyManager = uni.getUniverifyManager()
        // 取消订阅自定义按钮点击事件
        univerifyManager.offButtonsClick(callback)
        univerifyManager.login({
          //正式登录，弹出授权窗
          // provider: 'univerify',
          univerifyStyle: {
            // 自定义登录框样式
            fullScreen: true, // 是否全屏显示，true表示全屏模式，false表示非全屏模式，默认值为false。
            backgroundColor: '#ffffff', // 授权页面背景颜色，默认值：#ffffff
            icon: {
              path: '/static/logo.png', // 自定义显示在授权框中的logo，仅支持本地图片 默认显示App logo
            },
            phoneNum: {
              color: '#2281F5', // 手机号文字颜色 默认值：#000000
            },
            authButton: {
              normalColor: '#64b6a8', // 授权按钮正常状态背景颜色 默认值：#3479f5
              highlightColor: '#64b6a8', // 授权按钮按下状态背景颜色 默认值：#2861c5（仅ios支持）
              disabledColor: '#64b6a8', // 授权按钮不可点击时背景颜色 默认值：#73aaf5（仅ios支持）
              textColor: '#ffffff', // 授权按钮文字颜色 默认值：#ffffff
              title: '本机号码一键登录', // 授权按钮文案 默认值：“本机号码一键登录”
            },
            otherLoginButton: {
              visible: true, // 是否显示其他登录按钮，默认值：true
              normalColor: '', // 其他登录按钮正常状态背景颜色 默认值：透明
              highlightColor: '', // 其他登录按钮按下状态背景颜色 默认值：透明
              textColor: '#656565', // 其他登录按钮文字颜色 默认值：#656565
              title: '', // 其他登录方式按钮文字 默认值：“其他登录方式”
              borderColor: '', //边框颜色 默认值：透明（仅iOS支持）
              borderRadius: '0px', // 其他登录按钮圆角 默认值："24px" （按钮高度的一半）
            },
            privacyTerms: {
              defaultCheckBoxState: false, // 条款勾选框初始状态 默认值： true
              uncheckedImage: 'static/noSelect.png', // 可选 条款勾选框未选中状态图片（仅支持本地图片 建议尺寸 24x24px）(3.2.0+ 版本支持)
              checkedImage: 'static/select.png', // 可选 条款勾选框选中状态图片（仅支持本地图片 建议尺寸24x24px）(3.2.0+ 版本支持)
              checkBoxSize: '20', // 可选 条款勾选框大小，仅android支持
              textColor: '#666666', // 文字颜色 默认值：#BBBBBB
              termsColor: '#64B6A8', //  协议文字颜色 默认值： #5496E3
              prefix: '已阅读并同意', // 条款前的文案 默认值：“我已阅读并同意”
              suffix: ' ', // 条款后的文案 默认值：“并使用本机号码登录”
              privacyItems: [
                // 自定义协议条款，最大支持2个，需要同时设置url和title. 否则不生效
                {
                  url: 'https://bangbangtongcheng.com/agreement.html', // 点击跳转的协议详情页面
                  title: '帮帮同城隐私协议', // 协议名称
                },
                {
                  url: 'https://bangbangtongcheng.com/agreement2.html', // 点击跳转的协议详情页面
                  title: '帮帮同城用户协议', // 协议名称
                },
              ],
            },
            buttons: {
              // 自定义页面下方按钮仅全屏模式生效（3.1.14+ 版本支持）
              iconWidth: '45px', // 图标宽度（高度等比例缩放） 默认值：45px
              list: that.buttonsList
            },
          },
          success(res) {
            // 正式登录成功
            console.log('-------------', res.authResult) // {openid:'登录授权唯一标识',access_token:'接口返回的 token'}

            // 在得到access_token后，通过callfunction调用云函数
            uniCloud.callFunction({
              name: 'uni-getPhone', // 云函数名称
              data: {
                //传给云函数的参数
                access_token: res.authResult.access_token, // 客户端一键登录接口返回的access_token
                openid: res.authResult.openid, // 客户端一键登录接口返回的openid
              },
              success(callRes) {
                // console.log('调用云函数成功' + JSON.stringify(callRes))
                console.log('手机号登陆----苹果', callRes)
                that.$myRequest
                  .post('/mob/login/phoneOneClickLogin', {
                    phone: callRes.result.res.phoneNumber,
                    convencid: that.convencid,
                  })
                  .then((res) => {
                    console.log('手机号登陆结果:' + res)
                    if (!res.success) {
                      uni.showToast({
                        title: res.msg,
                        icon: 'none',
                        mask: true,
                      })
                      setTimeout(function () {
                        uni.closeAuthView() //关闭授权登录界面
                        if (res.msg == '当前用户已被冻结，无法登录') {
                          that.$refs.binds.open()
                          that.userIds = res.userInfo.id
                        }
                      }, 1000)
                    } else {
                      uni.setStorageSync('Pduser', res.userInfo)
                      that.$store.dispatch('user/login', res.userInfo)
					  // that.isBack()
                      setTimeout(function () {
                        uni.closeAuthView() //关闭授权登录界面
                        uni.switchTab({
                          url: '/pages/index/index',
                        })
                      }, 500)
                      uni.closeAuthView() //关闭授权登录界面
                    }
                  })
              },
              fail(callErr) {
                uni.showToast({
                  title: '授权失败',
                  icon: 'none',
                  mask: true,
                })
                console.log('调用云函数出错' + callErr)
                uni.closeAuthView() //关闭授权登录界面
              },
              // complete() {
              // 	uni.closeAuthView() //关闭授权登录界面
              // }
            })
          },
          fail(err) {
            if (err.errCode == 30003) {
              // 用户关闭验证界面
              if (uni.getStorageSync('Pduser')) {
                uni.closeAuthView() //关闭授权登录界面
                uni.switchTab({
                  url: '/pages/index/index',
                })
              } else {
                uni.reLaunch({
                  url: '/pages/index/index',
                })
              }
            }
            // 正式登录失败
            // if (err.provider=='phone') {
            // 	uni.closeAuthView() //关闭授权登录界面
            // }else if(err.provider=='weixin'){
            // 	that.handleThirdLoginApp()
            // 	return
            // }else if(err.provider=='apple'){
            // 	that.appleLogin()
            // 	return
            // }else if(err.provider=='Alipay'){
            // 		that.alipayLogin()
            // 		return
            // }
          },
        })
        const callback = (err) => {
          // 获取一键登录弹框协议勾选状态
          console.log('点击事件: ', err)
          univerifyManager.getCheckBoxState({
            success(res) {
              console.log('getCheckBoxState res: ', res)
              if (res.state) {
                // 关闭一键登录弹框
                // univerifyManager.close()
                if (err.provider == 'phone') {
                  uni.closeAuthView() //关闭授权登录界面
                  // that.show2 = true
                } else if (err.provider == 'weixin') {
                  that.handleThirdLoginApp()
                  return
                } else if (err.provider == 'apple') {
                  that.appleLogin()
                  return
                }
                else if (err.provider == 'Alipay') {
                  that.alipayLogin()
                  return
                }
              } else {
                uni.showToast({
                  title: '请勾选服务协议',
                  icon: 'none',
                  mask: true,
                })
              }
            },
          })
        }
        // 订阅自定义按钮点击事件
        univerifyManager.onButtonsClick(callback)
      },
      // 支付宝登录
      alipayLogin(type) {
        if (type==1&&this.checkboxValue.length <= 0) {
          this.loginType = 'Alipay'
          this.show2 = true
          return
        }
        let that = this
        const plug = uni.requireNativePlugin('Html5app-AlipayAuth')
        if (that.platform == 'ios' || that.platform == 'IOS') {
          plug.login(
            {
              appid: '2021003144632733',
              urlscheme: 'convenAlilogin',
            },
            (ret) => {
              console.log('支付宝登录----', ret)
              if (ret.code == 0) {
                console.log(ret.result.auth_code, '-------')
                let auth_code = ret.result.auth_code
                that.$myRequest
                  .get('/mob/login/aliLogin', {
                    code: auth_code,
                    convencid: that.convencid,
                  })
                  .then((res) => {
                    console.log(res)
                    let userInfo = {
                      nickname: res.userInfo.nikeName,
                      headimgurl: res.userInfo.image,
                      zfbOpenid: res.userInfo.zfbOpenid,
                    }
                    uni.setStorageSync('userInfo', JSON.stringify(userInfo))
                    this.getZfbuniID()
                  })
              } else {
                uni.showToast({
                  title: ret.msg,
                  icon: 'none',
                  mask: true,
                })
              }
            }
          )
        } else {
          plug.login(
            {
              appid: '2021003144632733',
            },
            (ret) => {
              if (ret.code == 0) {
                console.log(ret.result.auth_code, '-------')
                let auth_code = ret.result.auth_code
                that.$myRequest
                  .get('/mob/login/aliLogin', {
                    code: auth_code,
                    convencid: that.convencid,
                  })
                  .then((res) => {
                    console.log(res)
                    let userInfo = {
                      nickname: res.userInfo.nikeName,
                      headimgurl: res.userInfo.image,
                      zfbOpenid: res.userInfo.zfbOpenid,
                    }
                    uni.setStorageSync('userInfo', JSON.stringify(userInfo))
                    this.getZfbuniID()
                  })
              } else {
                uni.showToast({
                  title: '授权失败',
                  icon: 'none',
                  mask: true,
                })
              }
            }
          )
        }
      },
      submitAndroid() {
        const univerifyManager = uni.getUniverifyManager()
		// 取消订阅自定义按钮点击事件
		univerifyManager.offButtonsClick(callback)
        let that = this
        univerifyManager.login({
          //正式登录，弹出授权窗
          // provider: 'univerify',
          univerifyStyle: {
            // 自定义登录框样式
            fullScreen: true, // 是否全屏显示，true表示全屏模式，false表示非全屏模式，默认值为false。
            backgroundColor: '#ffffff', // 授权页面背景颜色，默认值：#ffffff
            icon: {
              path: 'static/logo.png', // 自定义显示在授权框中的logo，仅支持本地图片 默认显示App logo
            },
            phoneNum: {
              color: '#2281F5', // 手机号文字颜色 默认值：#000000
            },
            authButton: {
              normalColor: '#64b6a8', // 授权按钮正常状态背景颜色 默认值：#3479f5
              highlightColor: '#64b6a8', // 授权按钮按下状态背景颜色 默认值：#2861c5（仅ios支持）
              disabledColor: '#64b6a8', // 授权按钮不可点击时背景颜色 默认值：#73aaf5（仅ios支持）
              textColor: '#ffffff', // 授权按钮文字颜色 默认值：#ffffff
              title: '本机号码一键登录', // 授权按钮文案 默认值：“本机号码一键登录”
            },
            otherLoginButton: {
              visible: true, // 是否显示其他登录按钮，默认值：true
              normalColor: '', // 其他登录按钮正常状态背景颜色 默认值：透明
              highlightColor: '', // 其他登录按钮按下状态背景颜色 默认值：透明
              textColor: '#656565', // 其他登录按钮文字颜色 默认值：#656565
              title: '', // 其他登录方式按钮文字 默认值：“其他登录方式”
              borderColor: '', //边框颜色 默认值：透明（仅iOS支持）
              borderRadius: '0px', // 其他登录按钮圆角 默认值："24px" （按钮高度的一半）
            },
            privacyTerms: {
              defaultCheckBoxState: false, // 条款勾选框初始状态 默认值： true
              uncheckedImage: 'static/noSelect.png', // 可选 条款勾选框未选中状态图片（仅支持本地图片 建议尺寸 24x24px）(3.2.0+ 版本支持)
              checkedImage: 'static/select.png', // 可选 条款勾选框选中状态图片（仅支持本地图片 建议尺寸24x24px）(3.2.0+ 版本支持)
              checkBoxSize: '18', // 可选 条款勾选框大小，仅android支持
              textColor: '#666666', // 文字颜色 默认值：#BBBBBB
              termsColor: '#64B6A8', //  协议文字颜色 默认值： #5496E3
              prefix: '已阅读并同意', // 条款前的文案 默认值：“我已阅读并同意”
              suffix: ' ', // 条款后的文案 默认值：“并使用本机号码登录”
              privacyItems: [
                // 自定义协议条款，最大支持2个，需要同时设置url和title. 否则不生效
                {
                  url: 'https://bangbangtongcheng.com/agreement.html', // 点击跳转的协议详情页面
                  title: '帮帮同城隐私协议', // 协议名称
                },
                {
                  url: 'https://bangbangtongcheng.com/agreement2.html', // 点击跳转的协议详情页面
                  title: '帮帮同城用户协议', // 协议名称
                },
              ],
            },
            buttons: {
              // 自定义页面下方按钮仅全屏模式生效（3.1.14+ 版本支持）
              iconWidth: '45px', // 图标宽度（高度等比例缩放） 默认值：45px
              list: that.buttonsList
            },
          },
          success(res) {
            // 正式登录成功
            console.log('正式登录成功', res.authResult) // {openid:'登录授权唯一标识',access_token:'接口返回的 token'}

            // 在得到access_token后，通过callfunction调用云函数
            uniCloud.callFunction({
              name: 'uni-getPhone', // 云函数名称
              data: {
                //传给云函数的参数
                access_token: res.authResult.access_token, // 客户端一键登录接口返回的access_token
                openid: res.authResult.openid, // 客户端一键登录接口返回的openid
              },
              success(callRes) {
                console.log('调用云函数成功' + JSON.stringify(callRes))
                console.log('手机号登陆----安卓', callRes)
                that.$myRequest
                  .post('/mob/login/phoneOneClickLogin', {
                    phone: callRes.result.res.phoneNumber,
                    convencid: that.convencid,
                  })
                  .then((res) => {
                    console.log('手机号登陆结果:' + res)
                    if (!res.success) {
                      uni.showToast({
                        title: res.msg,
                        icon: 'none',
                        mask: true,
                      })
                      setTimeout(function () {
                        uni.closeAuthView() //关闭授权登录界面
                        if (res.msg == '当前用户已被冻结，无法登录') {
                          that.$refs.binds.open()
                          that.userIds = res.userInfo.id
                        }
                      }, 1000)
                    } else {
                      uni.setStorageSync('Pduser', res.userInfo)
                      that.$store.dispatch('user/login', res.userInfo)
					  // that.isBack()
                      setTimeout(function () {
                        uni.closeAuthView() //关闭授权登录界面
                        uni.switchTab({
                          url: '/pages/index/index',
                        })
                      }, 500)
                      uni.closeAuthView() //关闭授权登录界面
                    }
                  })
              },
              fail(callErr) {
                uni.showToast({
                  title: '授权失败',
                  icon: 'none',
                  mask: true,
                })
                console.log('调用云函数出错' + callErr)
              },
              // complete() {
              // 	uni.closeAuthView() //关闭授权登录界面
              // }
            })
          },
          fail(err) {
            if (err.errCode == 30003) {
              // 用户关闭验证界面
              if (uni.getStorageSync('Pduser')) {
                uni.closeAuthView() //关闭授权登录界面
                uni.switchTab({
                  url: '/pages/index/index',
                })
              } else {
                uni.reLaunch({
                  url: '/pages/index/index',
                })
              }
            }
            // 正式登录失败
            // if (err.provider=='phone') {
            // 	uni.closeAuthView() //关闭授权登录界面
            // }else if(err.provider=='weixin'){
            // 	that.handleThirdLoginApp()
            // 	return
            // }else if(err.provider=='Alipay'){
            // 	that.alipayLogin()
            // 	return
            // }
          },
        })
        const callback = (err) => {
          // 获取一键登录弹框协议勾选状态
          console.log('点击事件: ', err)
          univerifyManager.getCheckBoxState({
            success(res) {
              console.log('getCheckBoxState res: ', res)
              if (res.state) {
                // 关闭一键登录弹框
                // univerifyManager.close()
                // that.show2 = true
				console.log(err.provider,'登录方式')
                if (err.provider == 'phone') {
                  uni.closeAuthView() //关闭授权登录界面
                } else if (err.provider == 'weixin') {
                  that.handleThirdLoginApp()
                  return
                }
                else if (err.provider == 'Alipay') {
                  that.alipayLogin()
                  return
                }
              } else {
                uni.showToast({
                  title: '请勾选服务协议',
                  icon: 'none',
                  mask: true,
                })
              }
            },
          })
        }
        // 订阅自定义按钮点击事件
        univerifyManager.onButtonsClick(callback) 
		
      },
      passwordC() {
        this.isPassword = !this.isPassword
      },
      jinzhi() {
        let _this = this
        let param = window.location.href.split('#')[0]
        uni.request({
          method: 'post',
          data: {
            url: param,
          },
          header: {
            'content-type': 'application/x-www-form-urlencoded',
          },
          url: 'https://www.bangbangtongcheng.com/conven//mob/login/getJsTicket.do',
          success(re) {
            _this.jinzhifx(re.data)
          },
        })
      },
      jinzhifx(data) {
        wxshare.config({
          debug: false, //是否打开调试
          appId: data.appId, // 公众号的唯一标识
          timestamp: data.timestamp, // 生成签名的时间戳
          nonceStr: data.nonce, // ，生成签名的随机串
          signature: data.signature, // 签名
          jsApiList: ['hideMenuItems'],
        })
        // 禁止分享
        wxshare.hideMenuItems({
          // 要隐藏的菜单项，只能隐藏“传播类”和“保护类”按钮，所有menu项见附录3
          menuList: [
            'menuItem:share:appMessage',
            'menuItem:share:timeline',
            'menuItem:share:timeline',
            'menuItem:share:qq',
            'menuItem:favorite',
            'menuItem:share:QZone',
            'menuItem:openWithSafari',
          ],
        })
      },
      // 苹果登录
      appleLogin(type) {
        if (type==1&&this.checkboxValue.length <= 0) {
          this.loginType = 'apple'
          this.show2 = true
          return
        }
        var that = this
        // 判断是 iOS13版本
        uni.login({
          provider: 'apple',
          success: (loginRes) => {
            uni.getUserInfo({
              provider: 'apple',
              success: (userInfoRes) => {
                console.log(userInfoRes)
                let data = userInfoRes.userInfo
                let userInfo = {
                  pdOpenid: data.openId,
                  headimgurl: '',
                  nickname: '苹果用户',
                }
                uni.setStorageSync('userInfo', JSON.stringify(userInfo))
                // console.log("aaaaaaa");
                that.getuniID()
              },
              fail: (err) => {},
            })
          },
          fail: (err) => {},
        })
      },

      handleThirdLoginApp(type) {
		  //type表示是否需要判断勾选了协议 1的时候是需要 判断的
        if (type==1&&this.checkboxValue.length <= 0) {
          this.loginType = 'weixin'
          this.show2 = true
          return
        }
        console.log('App微信拉起授权')
        var that = this
        uni.getProvider({
          service: 'oauth',
          success: function (res) {
            console.log(res.provider) //支持微信、qq和微博等
            if (res.provider.indexOf('weixin')) {
              uni.login({
                provider: 'weixin',
                success: function (loginRes) {
                  console.log('App微信获取用户信息成功', loginRes)
                  that.getApploginData(loginRes) //请求登录接口方法
                },
                fail: function (res) {
                  console.log('App微信获取用户信息失败', res)
                  uni.showToast({
                    title: '用户取消授权',
                    icon: 'none',
                  })
                },
              })
            }
          },
        })
      },
      getApploginData(data) {
        var that = this
        //这边是前端自己去调微信用户信息的接口，根据接口需要请求，如果不需要前端去获取的话就交给后端，可省去次操作
        uni.request({
          url:
            'https://api.weixin.qq.com/sns/userinfo?access_token=' +
            data.authResult.access_token +
            '&openid=' +
            data.authResult.openid,
          method: 'GET',
          dataType: 'json',
          header: {
            'content-type': 'application/x-www-form-urlencoded', // 默认值
          },
          success(res) {
            console.log('【登录回调啾啾啾】', res)
            let data = res.data
            let userInfo = {
              openid: data.unionid,
              headimgurl: data.headimgurl,
              nickname: data.nickname,
            }
            uni.setStorageSync('userInfo', JSON.stringify(userInfo))
            // console.log("aaaaaaa");
            that.getWxuniID()

            // uni.setStorageSync("userInfo", JSON.stringify(res.data));
            // uni.showToast({
            //   title: "账号未注册，请完善信息",
            //   icon: "none",
            //   mask: true,
            // });
            // uni.navigateTo({ url: "/pages/login/register" });
            // if (res.data.phone) {
            //   uni.setStorageSync("phone", res.data.phone);
            //   uni.showToast({
            //     title: "登录成功",
            //     icon: "none",
            //     mask: true,
            //   });
            //   setTimeout(function () {
            //     uni.reLaunch({ url: "/pages/index/index" });
            //   }, 1500);
            // } else {
            //   uni.setStorageSync("userInfo", JSON.stringify(res.data));
            //   uni.showToast({
            //     title: "账号未注册，请完善信息",
            //     icon: "none",
            //     mask: true,
            //   });
            //   setTimeout(function () {
            //     uni.navigateTo({ url: "/pages/login/register" });
            //   }, 1500);
            // }
          },
          fail() {},
        })
      },
      getWxuniID() {
        let that = this
        let userInfo = JSON.parse(uni.getStorageSync('userInfo'))
        // // #ifdef MP || H5
        // userInfo = JSON.parse(uni.getStorageSync("userInfo"));
        // //#endif
        // //#ifdef APP-PLUS
        // userInfo = JSON.parse(uni.getStorageSync("userInfo"));
        // // #endif
        console.log('openid是:', userInfo.openid)
        console.log(userInfo)
        this.$myRequest
          .get('/mob/login/getUserByWXOpenId', {
            openId: userInfo.openid,
            convencid: that.convencid,
          })
          .then((res) => {
            console.log('获取的信息是:', res)
            this.userInfo = res.userInfo
            if (!res.userInfo.phone) {
              if (res.userInfo == {} || !res.userInfo.phone) {
                // uni.showToast({
                // 	title: "请绑定手机号",
                // 	icon: "none",
                // 	mask: true
                // });
                this.checkboxValue = []
                uni.navigateTo({
                  url: '/pages/login/binding',
                })
                uni.closeAuthView()
              }
            } else {
              if (!res.success) {
                uni.showToast({
                  title: res.msg,
                  icon: 'none',
                  mask: true,
                })
                if (res.msg == '当前用户已被冻结，无法登录') {
                  this.$refs.binds.open()
                  this.userIds = res.userInfo.id
                }
              } else {
                uni.setStorageSync('Pduser', res.userInfo)
                that.$store.dispatch('user/login', res.userInfo)
				// that.isBack()
                setTimeout(function () {
                  this.checkboxValue = []
                  // uni.navigateBack({
                  //   delta: 1,
                  // })
                  uni.closeAuthView() //关闭授权登录界面
                  uni.switchTab({
                    url: '/pages/index/index',
                  })
                }, 500)
              }
            }
          })
      },
      getZfbuniID() {
        let that = this
        let userInfo = JSON.parse(uni.getStorageSync('userInfo'))
        // // #ifdef MP || H5
        // userInfo = JSON.parse(uni.getStorageSync("userInfo"));
        // //#endif
        // //#ifdef APP-PLUS
        // userInfo = JSON.parse(uni.getStorageSync("userInfo"));
        // // #endif
        console.log('openid是:', userInfo.zfbOpenid)
        this.$myRequest
          .get('/mob/login/getUserByAliOpenId', {
            openId: userInfo.zfbOpenid,
            convencid: that.convencid,
          })
          .then((res) => {
            console.log('获取的信息是:', res)
            this.userInfo = res.userInfo
            if (!res.userInfo.phone) {
              if (res.userInfo == {} || !res.userInfo.phone) {
                // uni.showToast({
                // 	title: "请绑定手机号",
                // 	icon: "none",
                // 	mask: true
                // });
                console.log(222222222)
                uni.navigateTo({
                  url: '/pages/login/binding',
                })
                uni.closeAuthView()
              }
            } else {
              if (!res.success) {
                uni.showToast({
                  title: res.msg,
                  icon: 'none',
                  mask: true,
                })
                if (res.msg == '当前用户已被冻结，无法登录') {
                  this.$refs.binds.open()
                  this.userIds = res.userInfo.id
                }
              } else {
                uni.setStorageSync('Pduser', res.userInfo)
                that.$store.dispatch('user/login', res.userInfo)
				// that.isBack()
                setTimeout(function () {
                  uni.closeAuthView() //关闭授权登录界面
                  uni.switchTab({
                    url: '/pages/index/index',
                  })
                }, 500)
              }
            }
          })
      },
      getuniID() {
        let that = this
        let userInfo = JSON.parse(uni.getStorageSync('userInfo'))
        // // #ifdef MP || H5
        // userInfo = JSON.parse(uni.getStorageSync("userInfo"));
        // //#endif
        // //#ifdef APP-PLUS
        // userInfo = JSON.parse(uni.getStorageSync("userInfo"));
        // // #endif
        console.log('openid是:', userInfo.pdOpenid)
        this.$myRequest
          .get('/mob/login/getUserByApplyId', {
            openId: userInfo.pdOpenid,
            convencid: that.convencid,
          })
          .then((res) => {
            console.log('获取的信息是:', res)
            this.userInfo = res.userInfo
            if (!res.userInfo.phone) {
              if (res.userInfo == {} || !res.userInfo.phone) {
                // uni.showToast({
                // 	title: "请绑定手机号",
                // 	icon: "none",
                // 	mask: true
                // });
                this.checkboxValue = []
                uni.navigateTo({
                  url: '/pages/login/binding',
                })
                uni.closeAuthView()
              }
            } else {
              if (!res.success) {
                uni.showToast({
                  title: res.msg,
                  icon: 'none',
                  mask: true,
                })
                if (res.msg == '当前用户已被冻结，无法登录') {
                  this.$refs.binds.open()
                  this.userIds = res.userInfo.id
                }
              } else {
                uni.setStorageSync('Pduser', res.userInfo)
                that.$store.dispatch('user/login', res.userInfo)
				// that.isBack()
                setTimeout(function () {
                  this.checkboxValue = [];
                  uni.closeAuthView() //关闭授权登录界面
                  uni.switchTab({
                    url: '/pages/index/index',
                  })
                  // uni.navigateBack({
                  //   delta: 1,
                  // })
                  // uni.closeAuthView() //关闭授权登录界面
                }, 500)
              }
            }
          })
      },
      checkboxChange(e) {},
      // 跳转到隐私协议
      toPrivacyPage(type) {
        //#ifdef APP-PLUS
        if (type == 1) {
          uni.navigateTo({
            url: `/pages/login/privacy?url=${'https://bangbangtongcheng.com/agreement2.html'}`,
          })
        } else if (type == 2) {
          uni.navigateTo({
            url: `/pages/login/privacy?url=${'https://bangbangtongcheng.com/agreement.html'}`,
          })
        }
        // #endif
        //#ifdef H5
        let url =
          type == 1
            ? 'https://bangbangtongcheng.com/agreement2.html'
            : 'https://bangbangtongcheng.com/agreement.html'
        window.location.href = url
        //#endif
      },
      register() {
        uni.navigateTo({
          url: '/pages/login/register',
        })
      },
      login() {
        this.loginType = 'phone'
        if (this.loading == true) return
        // if (!this.checkBoxs.length) {
        // 	uni.showModal({
        // 		title: "",
        // 		content: "请同意用户条款",
        // 		showCancel: false,
        // 		success: function (res) {
        // 			if (res.confirm) {
        // 				console.log("用户点击确定");
        // 			} else if (res.cancel) {
        // 				console.log("用户点击取消");
        // 			}
        // 		}
        // 	});
        // 	return;
        // }
        this.loading = true
        let disabled = true
        if (!this.reg_tel.test(this.phone)) {
          uni.showToast({
            title: '请填写正确的手机号码',
            icon: 'none',
            mask: true,
          })
          this.loading = false
          return
        }
        if (this.isPassword) {
          if (this.password == '' || this.password == undefined) {
            uni.showToast({
              title: '请输入密码',
              icon: 'none',
              mask: true,
            })
            disabled = false
            this.loading = false
          }
        } else {
          if (this.Verifys != this.code) {
            uni.showToast({
              title: '验证码不正确，请重新填写',
              icon: 'none',
              mask: true,
            })
            disabled = false
            this.loading = false
          }
        }
        if (this.checkboxValue.length <= 0) {
          // uni.showToast({
          //   title: '请先阅读并同意《用户协议》、《隐私政策》',
          //   icon: 'none',
          //   mask: true,
          // })
          this.show2 = true
          this.loading = false
          return
        }
        if (!disabled) return
        this.$myRequest
          .post('/mob/login/phoneLogin', {
            phone: this.phone,
            loginType: this.isPassword ? '2' : '1',
            phoneCode: this.Verifys,
            password: this.password,
            convencid: this.convencid,
          })
          .then((res) => {
            this.loading = false
            if (!res.success) {
              uni.showToast({
                title: res.msg,
                icon: 'none',
                mask: true,
              })
              if (res.msg == '当前用户已被冻结，无法登录') {
                this.$refs.binds.open()
                this.userIds = res.userInfo.id
              }
              if (res.msg == '还未设置密码，请先设置密码') {
                this.isLogin = false
                this.isPassword = false
              }
              // if (res.code == 401) {
              //   console.log(2222222)
              //   this.isLogin = false
              // }
            } else {
              console.log(res.userInfo, '手机号登陆')
              uni.showToast({
                title: '登录成功',
                icon: 'none',
                mask: true,
              })
              uni.setStorageSync('Pduser', res.userInfo)
              this.$store.dispatch('user/login', res.userInfo)
              // 登陆后还需要返回之前操作页面
              if (this.isNeedBack) {
                setTimeout(function () {
                  this.checkboxValue = []
                  uni.switchTab({
                    url: '/pages/index/index',
                  })
                  // uni.navigateBack({
                  //   delta: 1,
                  // })
                }, 2000)
              } else {
                // 登录之后不需要返回之前的页面
                if (res.userInfo.businessType == 1) {
                  this.$myRequest
                    .get('/mob/user/isMarkResignation', {
                      userId: res.userInfo.id,
                    })
                    .then((res) => {
                      if (res.code == 200) {
                        console.log(res)
                        getApp().globalData.confirm = res.confirm
                        this.checkboxValue = []
                        uni.switchTab({
                          url: '/pages/index/index',
                        })
                      }
                    })
                } else {
                  this.$myRequest
                    .get('/api/mobile/vehicleOwner/getWhetherMarkResignationByUserId', {
                      userId: res.userInfo.id,
                    })
                    .then((res) => {
                      if (res.code == 200) {
                        getApp().globalData.confirm = res.confirm
                        this.checkboxValue = []
                        uni.switchTab({
                          url: '/pages/index/index',
                        })
                      }
                    })
                }
              }
            }
          })
          .catch((err) => {
            this.loading = false
            if (err.msg == '当前用户已被冻结，无法登录') {
              this.$refs.binds.open()
              this.userIds = err.userInfo.id
            }
            if (err.code == 401) {
              console.log(2222222)
              this.isLogin = false
            }
          })
      },
	  isBack(){
		  console.log('是否进来了？',this.isNeedBack)
		  if (this.isNeedBack) {
		    setTimeout(function () {
		      uni.closeAuthView() //关闭授权登录界面
          uni.switchTab({
            url: '/pages/index/index',
          })
		    }, 500)
		  } else {
			  setTimeout(function () {
			    uni.switchTab({
			      url: '/pages/index/index',
			    })
			  }, 500)
			   uni.closeAuthView() //关闭授权登录界面
		  }
	  },
      checkboxC(e) {
        // console.log(e);
        this.checkBoxs = e.detail.value
      },
      async tags(type) {
        if (type == this.curTarget) {
          this.show1 = true
          return
        }
        this.type = type
        if (type == 2) {
          this.text = '隐私协议'
        } else if (type == 3) {
          this.text = '用户服务协议'
        }
        await this.getContent()
        this.curTarget = type
        // this.show1 = true;
      },
      getContent() {
        let _this = this
        _this.$myRequest
          .get('/mob/user/getText', {
            type: this.type,
          })
          .then((res) => {
            this.data = res.list[0]
            //视图会发生重新渲染
            this.scrollTop = this.oldScrollTop
            //当视图渲染结束 重新设置为0
            this.$nextTick(() => {
              this.show1 = true
              this.scrollTop = 0
            })
          })
      },
      getcode() {
        console.log(this.status)
        this.phone = this.phone.trim()
        if (!this.reg_tel.test(this.phone)) {
          uni.showToast({
            title: '请填写正确的手机号码',
            icon: 'none',
            mask: true,
          })
          return
        }
        if (!this.canClick) return
        this.show = true
      },
    },
  }
</script>

<style lang="less" scoped>
  .box {
    min-height: 100vh;
    background: #fff;
  }

  .binds_frame {
    width: 600rpx;
    background-color: #ffffff;
    padding-bottom: 50rpx;
    border-radius: 10rpx;
    text-align: center;

    .binds_frame_t {
      font-size: 30rpx;
      font-weight: 550;
      color: #000000;
      padding: 0 46rpx;
      padding-top: 36rpx;
    }

    .binds_frame_c {
      width: 500rpx;
      margin: 0 auto;
      font-size: 28rpx;
      font-weight: 400;
      color: #64b6a8;
      margin-top: 30rpx;
      margin-bottom: 50rpx;
    }

    .binds_frame_b {
      display: flex;
      align-items: center;
      justify-content: space-around;

      .cancel {
        width: 210rpx;
        height: 70rpx;
        background-color: #64b6a8;
        border-radius: 10rpx;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 30rpx;
        font-weight: 400;
        color: #fff;
      }

      .determine {
        width: 210rpx;
        height: 70rpx;
        background-color: #000;
        border-radius: 10rpx;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 30rpx;
        font-weight: 400;
        color: #fff;
      }
    }
  }

  .top {
    padding-top: 88rpx;
    background: transparent;

    .title {
      // text-align: center;
      height: 88rpx;
      line-height: 88rpx;
      font-size: 36rpx;
      padding: 0 37rpx;
      text-align: center;
      font-size: 34rpx;
      color: #000;
    }

    .back {
      width: 40rpx;
      height: 40rpx;
    }
  }

  .login-box {
    padding: 90rpx 100rpx 0;

    .box-title {
      line-height: 75rpx;
      font-size: 46rpx;
      margin-bottom: 105rpx;
      color: #64b6a8;
      font-weight: 600;
    }

    .input-box {
      height: 65rpx;
      border-bottom: 1rpx solid #d0d0d0;
      position: relative;
      margin-bottom: 52rpx;

      input {
        width: 100%;
        height: 64rpx;
        line-height: 64rpx;
        color: #333;
        font-size: 28rpx;
      }

      .area {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        color: #333;
        left: 0;
      }

      .line {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        color: #333;
        left: 60rpx;
        height: 30rpx;
        width: 2rpx;
        background: #333;
      }

      .getcode {
        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
        color: #64b6a8;
        font-size: 28rpx;
        z-index: 10;
      }
    }

    .agreement {
      display: flex;
      padding-left: 10rpx;
      padding-top: 50rpx;
      font-size: 24rpx;
      align-items: center;

      .checkbox-group {
        // width: 50rpx !important;
        // height: 40rpx !important;
        /* #ifdef MP */
        width: 50rpx !important;
        height: 50rpx !important;
        /* #endif */
        /* #ifdef APP-PLUS || H5 */
        width: 32rpx !important;
        height: 32rpx !important;
        /* #endif */
      }

      .text {
        display: flex;
        align-items: center;
        line-height: 37rpx;
        margin-left: 10rpx;
      }

      .tags {
        color: #64b6a8;
      }
    }

    .login {
      width: 100%;
      height: 76rpx;
      line-height: 76rpx;
      background: #64b6a8;
      color: #fff;
      border-radius: 100rpx;
      margin-top: 38rpx;
      margin-bottom: 24rpx;
    }

    .flex-center {
      display: flex;
      justify-content: center;
      align-items: center;

      .line {
        margin: 0 10rpx;
      }

      view {
        font-size: 26rpx;
        line-height: 37rpx;
        color: #666666;
      }
    }
  }

  .bottom-nav {
    position: fixed;
    bottom: 100rpx;
    left: 0;

    width: 100%;
    padding: 0 0 80rpx;

    .bottom-top {
      display: flex;
      align-items: center;
      justify-content: space-around;
      height: 40rpx;
      width: 550rpx;
      margin: 0 auto 58rpx;

      .line {
        width: 100rpx;
        height: 2rpx;
        background: #666;
      }

      .title-text {
        font-size: 28rpx;
        color: #666;
      }
    }

    .bottom-loginType {
      display: flex;
      justify-content: center;
      /* align-items: center; */
      align-items: flex-start;

      .type {
        width: 120rpx;
        text-align: center;
        margin-right: 60rpx;

        image {
          width: 80rpx;
          height: 80rpx;
        }

        view {
          font-size: 28rpx;
          line-height: 40rpx;
          margin-top: 10rpx;
        }
      }

      .sign-in-with-apple {
        width: 260rpx;
        text-align: center;
        /* margin-right: 60rpx; */
        display: flex;
        padding: 3px 5px;
        border: rgb(49, 49, 49) 1px solid;
        border-radius: 6px;
        margin-top: 4px;

        image {
          width: 40rpx;
          height: 40rpx;
        }

        view {
          font-size: 24rpx;
          line-height: 50rpx;
          margin-left: 10rpx;
          font-weight: 600;
          /* margin-top: 10rpx; */
        }
      }

      .type:last-child {
        margin-right: 0;
      }
    }
  }

  .privacy-box {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    position: fixed;
    bottom: 60rpx;
    left: 0;
    width: 100%;
    padding: 0 30rpx;
    box-sizing: border-box;

    text {
      text-wrap: nowrap;
    }
  }

  .motaikuang {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 20;

    .verify {
      position: fixed;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
    }
  }

  .motaikuang1 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 20;

    .text {
      position: fixed;
      bottom: 0;
      width: 100%;
      background: #fff;
      left: 0;
      padding-top: 60rpx;
      padding-bottom: 100rpx;
      border-radius: 50rpx 50rpx 0 0;

      .textTitle {
        font-size: 36rpx;
        line-height: 50rpx;
        text-align: center;
        margin-bottom: 50rpx;
      }

      .scroll-view {
        height: 700rpx;
        margin: 0 auto;
        width: 630rpx;
      }
    }
  }

  .checked {
    background: #007aff;
  }

  /deep/.uni-checkbox-input-checked {
    background-color: #64b6a8 !important;
    border-color: #64b6a8 !important;
  }

  /deep/ .uni-checkbox-input {
    border-color: #666;
    background: #fff;
  }

  .motaikuang {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 20;

    .verify {
      position: fixed;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
    }
  }

  .motaikuang2 {
    .tips {
      position: fixed;
      bottom: 0;
      width: 100%;
      background: #fff;
      left: 0;
      padding: 40rpx 30rpx 100rpx;
      border-radius: 50rpx 50rpx 0 0;
      box-sizing: border-box;

      .text {
        margin-bottom: 48rpx;
      }

      .btns {
        display: flex;

        .btn {
          height: 90rpx;
          width: 50%;

          &:first-child {
            background: #f2f2f2;
            border-radius: 10rpx 0rpx 0rpx 10rpx;
          }

          &:last-child {
            background: #64b6a8;
            color: #fff;
            border-radius: 0rpx 10rpx 10rpx 0rpx;
          }
        }
      }
    }

    .tags {
      color: #64b6a8;
      display: inline-block;
    }
  }
</style>
